<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .container{
            /* 父元素里面的所有子元素都响应式布局 */
            display: flex;
            border: red 1px solid;
            /* 均匀等分  在排列线上*/
            /* justify-content: space-between; */
            padding: 0 50px;    
            box-sizing: border-box;
            /* 超出部分换行  默认是nowrap*/
            flex-wrap: wrap;

            /* justify-content: space-around; */
        }
        .item{
            width: 200px;
            height: 300px;
            border: 1px solid rebeccapurple;
            /* float: left; */
        }
    </style>
</head>
<body>
    <!-- flex  布局也称作弹性布局/响应式布局 -->
    <div class="container">
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
    </div>
</body>
</html>